/**
 * @author Francesco Rosso, matr 592057
 */

package pcd1112;

import java.io.FileNotFoundException;
import java.net.MalformedURLException;
import java.rmi.AlreadyBoundException;
import java.rmi.Naming;
import java.rmi.RemoteException;

import pcd1112.model.TxtWriterImpl;

public class MainServer {

	private static final String HOST = "localhost";

	public static void main(String[] args) throws RemoteException,
			MalformedURLException, FileNotFoundException, AlreadyBoundException {
		TxtWriterImpl obj = new TxtWriterImpl();
		// Registry registry = LocateRegistry.getRegistry();
		String rmiObjName = "//" + HOST + "/Writer";
		Naming.rebind(rmiObjName, obj);

		System.out.println("Server ready");
	}

}
